#ifndef __CARIOU_LINARD_SCENE_HH__
#define __CARIOU_LINARD_SCENE_HH__

#include "geometry.h"
#include "texturemanager.h"

#include <vector>

class Scene
{
    protected:

        std::vector<SolidObject *> objects;
        std::vector<Light *> lights;

        TextureManager texmanager;

        Intersection nearIntersection(const Ray &ray) const;

        Color ambiantLight;

        double distanceFog;
        Color  colorFog;


    public:

        Scene();
        virtual ~Scene();
        Scene(const Scene &);
        virtual Scene& operator=(const Scene &);

        void addObject(SolidObject *);
        void addLight (Light       *);

        FTexture * addTexture(const std::string &);

        void cleanAllScene();

        //void load(const std::string &);
        SolidObject * lastObjectLoad()
        {
            return objects[objects.size()-1];
        }

        void setAmbiantLight(const Color &);
        void setFogParameters(const double &, const Color &);

        void getColorAt(Ray, Intersection &, Color &, unsigned int) const;
        void rayTracering(Ray, Color &, unsigned int ) const;
};

#endif
